/*
 * @Author: your name
 * @Date: 2021-05-19 17:22:23
 * @LastEditTime: 2021-05-27 16:31:03
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: /xiangpan-admin/src/pages/home/scheduModal/index.tsx
 */
import { IFormTypeEnum } from '@/components/form/formComponent';
import { Modal } from 'antd';
import HeaderForm from '@/components/form';

import React from 'react';
interface IProps {
  visible: boolean;
  close: () => void;
}
interface IProps {}

const AddRoomModal = (props: IProps) => {
  const List = [
    {
      key: 'name',
      type: IFormTypeEnum.Input,
      label: '房间名称',
      rules: [{ required: true }],
    },
    {
      key: 'name',
      type: IFormTypeEnum.Input,
      label: '床位',
      rules: [{ required: true }],
    },
    {
      key: 'account',
      type: IFormTypeEnum.Input,
      label: '登录账号',
      rules: [{ required: true }],
    },
    {
      key: 'password',
      type: IFormTypeEnum.Input,
      label: '登录密码',
      rules: [{ required: true }],
    },
  ];
  return (
    <Modal
      maskClosable={false}
      visible={props.visible}
      title={'添加房间'}
      footer={null}
      onCancel={props.close}
    >
      <HeaderForm
        labelwidth={80}
        layout="horizontal"
        list={List}
        onSubmit={(form) => {
          console.log(form, 'form==');
        }}
      />
    </Modal>
  );
};
export default AddRoomModal;
